package test.collections.domain;

import java.util.Comparator;

public class SortedListType implements Comparator<SortedListType> {
	
	private Integer typeId;
	private String typeName;

	public SortedListType(Integer typeId, String typeName) {
		super();
		this.typeId = typeId;
		this.typeName = typeName;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "SortedListType [typeId=" + typeId + ", typeName=" + typeName + "]";
	}

	@Override
	public int compare(SortedListType t1, SortedListType t2) {
		return t1.getTypeId().compareTo(t2.getTypeId());
	}

	/**
	 * @return the typeId
	 */
	public Integer getTypeId() {
		return typeId;
	}

	/**
	 * @param typeId the typeId to set
	 */
	public void setTypeId(Integer typeId) {
		this.typeId = typeId;
	}

	/**
	 * @return the typeName
	 */
	public String getTypeName() {
		return typeName;
	}

	/**
	 * @param typeName the typeName to set
	 */
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

}
